package org.datascooter.bundle.attribute;

import org.datascooter.impl.Condition;
import org.datascooter.impl.DataSnip;

public abstract class ContainerAttribute extends AbstractAttribute {

	protected String entity;
	protected boolean embedded = false;
	protected PersistencePolicy policy;
	protected boolean fetchLazy = false;
	protected String mapKeyAttribute;
	protected String orderBy;
	protected Class<?> returnType;
	protected String refOwner, ownerAttribute;
	protected String linkTable;
	protected Condition condition;
	protected DataSnip query;

	public ContainerAttribute(String name) {
		super(name);
	}

	public void setMapKeyAttribute(String attribute) {
		mapKeyAttribute = attribute;
	}

	public String getMapKeyAttribute() {
		return mapKeyAttribute;
	}

	public boolean isFetchLazy() {
		return fetchLazy;
	}

	public String getLinkTable() {
		return linkTable;
	}

	public void setLinkTable(String linkTable) {
		this.linkTable = linkTable;
	}

	public String getOrderBy() {
		return orderBy;
	}

	public boolean isEmbedded() {
		return embedded;
	}

	public PersistencePolicy getPolicy() {
		return policy;
	}

	public void setPolicy(PersistencePolicy policy) {
		this.policy = policy;
	}

	public Object getEntity() {
		return entity;
	}

	public final void setEntity(String name) {
		entity = name;
	}

	public Class<?> getReturnType() {
		return returnType;
	}
}
